﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
<xsl:output method="html" indent="yes"/>

    <xsl:template match="/">

      <div>
        <input type="button" value="Add new ticket" id="addNewTicket"  />
      </div>
      
      <table class="tickets-view">
        <thead>
          <tr>
            <th>ID</th>
            <th>Ticket Title</th>
            <th>Prority</th>
            <th>Description</th>
            <th>Created By</th>
          </tr>
        </thead>
        <tbody>
          <xsl:for-each select="/dsQueryResponse/Rows/Row">
            <tr>
              <td>
                <xsl:value-of select="@ID" disable-output-escaping="yes" />
              </td>
              <td>
                <xsl:value-of select="@Title" disable-output-escaping="yes" />
              </td>
              <td>
                <xsl:value-of select="@TicketPriority" disable-output-escaping="yes" />
              </td>
              <td>
                <xsl:value-of select="@Des" disable-output-escaping="yes" />
              </td>
              <td>
                <xsl:value-of select="@Author" disable-output-escaping="yes" />
              </td>
            </tr>
          </xsl:for-each>
        </tbody>
      </table>
      
    </xsl:template>
</xsl:stylesheet>
